package com.cd.music.config;

import com.cd.music.interceptor.RequestInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.List;

/**
 * @author yxl 余秀良
 * @version 1.0
 * @description: 用途
 * @date 2018年01月19日  上午11:52
 * @address: 四川成都
 */
@Configuration
public class WebAppConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        //参数转换拦截
        argumentResolvers.add(new RequestInterceptor());
        super.addArgumentResolvers(argumentResolvers);
    }

    /*@Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login").setViewName("aa.html");
        super.addViewControllers(registry);
    }*/
}
